<%-- 
    Document   : validation
    Created on : 11/11/2012, 10:00:42 AM
    Author     : Vanie Torres
--%>

<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/css/default.css"/>
<script type="text/javascript">
var formValidator = 'formValidator:';
function validarDatos(parametro) {
    //document.getElementById(formNombreFormulario + 'txtNombreControl').value = parametro;
    //var valor = document.getElementById(formNombreFormulario + 'txtNombreControl').value;
}
</script>
<table align="center" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td width="100%">
<h:form id="formValidator">
<rich:modalPanel id="mpMessage" showWhenRendered="#{facesContext.maximumSeverity != null}"
                 width="450" height="150">
    <f:facet name="header">
        <h:outputText value="Mensaje: #{constants.titleBoxMsg}"/>
    </f:facet>
    <h:panelGrid columns="2">
        <h:panelGrid cellpadding="0" cellspacing="0">
            <h:panelGrid columns="2" rendered="#{facesContext.maximumSeverity.ordinal == 0}">
                <h:graphicImage value="/img/iconos/ico_inf.png"/>
            </h:panelGrid>
            <h:panelGrid columns="2" rendered="#{facesContext.maximumSeverity.ordinal == 2}">
                <h:graphicImage value="/img/iconos/ico_err.png"/>
            </h:panelGrid>
        </h:panelGrid>
        <rich:messages id="mpMessage1">
            <f:facet name="infoMarker">
                <h:outputText value="- " styleClass="lbltextoboxmsg"/>
            </f:facet>

            <f:facet name="errorMarker">
                <h:outputText value="- " styleClass="lbltextoboxmsg"/>
            </f:facet>
        </rich:messages>
    </h:panelGrid>
    <h:panelGrid style="text-align:center;">
        <a4j:commandButton id="btnAceptar" value="Aceptar" onclick="Richfaces.hideModalPanel('mpMessage');"/>
    </h:panelGrid>
</rich:modalPanel>
</h:form>
</td>
</tr>
</table>
